<template>
  <div>
    <div class="detail-top">
      <!--      <div class="detail-top-c" v-if="type == 0">您的当前位置：企业新闻 > 赛事风采 > 赛事详情</div>
      <div class="detail-top-c" v-else>您的当前位置：企业新闻 > 新闻资讯 > 新闻详情</div>-->
      <div class="detail-top-c">
        <span>您的当前位置：</span>
        <router-link class="link-nav" to="/enterprise">企业新闻</router-link>
        <span> > </span>
        <router-link class="link-nav" to="/enterprise?index=1">新闻资讯</router-link>
        <span> > 新闻详情</span>
      </div>
    </div>
    <div class="detail-body">
      <div class="detail-title">{{ info.title }}</div>
      <div class="detail-time">{{ info.createtime }}</div>
      <div v-html="info.content" style="margin-top: 40px"></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      type: 0,
      id: 0,
      info: {},
    };
  },
  mounted() {
    this.id = this.$route.params.id;
    this.type = this.$route.query.type;
    this.getData();
  },
  methods: {
    getData() {
      this.ajaxs("Index/newsInfo", {
        data: {
          id: this.id,
        },
        success: (res) => {
          this.info = res.data;
        },
      });
    },
  },
};
</script>

<style scoped>
.detail-top {
  height: 40px;
  background-color: #fcfcfc;
}
.detail-top-c {
  width: 1200px;
  height: 40px;
  line-height: 40px;
  text-align: right;
  margin: auto;
  font-size: 12px;
  color: #666666;
}
.detail-body {
  width: 1200px;
  margin: auto;
  padding: 20px 0;
}
.detail-title {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
}
.detail-time {
  padding: 10px 0;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #eeeeee;
}
</style>
